#include "arete.h"
Arete::Arete() 
{
}
Arete::Arete(Sommet *u0, Sommet *v0)
{
	u = u0;
        v = v0;
        couleur=0;
}

Arete::Arete(const Arete& a)
{
	this->u = a.u;
	this->v = a.v;
	this->couleur = a.couleur;
}

Arete::~Arete(){}

Sommet* Arete::getOpposite(Sommet *s)const
{
	if(s==u) return v;
	else return u; 
}

Sommet* Arete::getU()const {return u;}
Sommet* Arete::getV()const {return v;}

void Arete::setU(Sommet *s) {u = s;}
void Arete::setV(Sommet *s) {v = s;}

int Arete::getCouleur(){return couleur;}
void Arete::setCouleur(int color){couleur = color;}
void Arete::affiche()const 
{
	cout<<"arete"<<"{(";
	u->affiche();
	cout<<")"<<","<<"(";
	v->affiche();
        cout<<")}";
}

Arete Arete::operator=(const Arete& a)
{
	this->u = a.u;
	this->v = a.v;
	return *this;
}

bool Arete::operator==(const Arete& a)
{
	return (this->u == a.u && this->v == a.v)
		|| (this->u == a.v && this->v == a.u);
}
